<!-- inc:frame.top -->

<div class="position"><p><!-- inc:position --> &raquo; 系统组管理</p><!-- inc:position.fr --></div>

<div class="page_pad">
  <div class="content_add"><button class="gbutton gbutton_dblue gbutton_add" type="button" onclick="qgurl('{:$mainlink}?file=sysgroup&act=add')">添加系统组</button> <button class="gbutton gbutton_dblue gbutton_add" type="button" onclick="qgurl('{:$mainlink}?file=sysgroup&act=orderlist')">系统组排序</button></div>
  
  <div class="content_box">
    <div class="content_bor">
      <table class="ltable">
        <tr class="first">
          <td width="200">分类ID</td>
          <td align="left">系统组/分类名称</td>
          <td width="320">操作</td>
        </tr>
        <!-- $rslist AS $key=>$value -->
        <tr>
          <td>--</td>
          <td align="left"><div class="syslist noselect" data-sysid="{:$value[id]}"><span class="sysmore">+</span><span class="catebred">{:$value[groupname]}</span> <span class="colorlight">(系统组)</span></div></td>
          <td>
            <!-- if($_SESSION["admin"]["typer"] == "system") -->
            <a href="{:$mainlink}?file=sysgroup&act=modify&id={:$value[id]}">编辑系统组</a>&nbsp;&nbsp;
            <a href="javascript:void(0)" onclick="delete_confirm('{:$value[groupname]}',{:$value[id]})">删除系统组</a>&nbsp;&nbsp;
            <a href="{:$mainlink}?file=sysgroup&act=fieldlist&sysgroupid={:$value[id]}">字段管理</a>&nbsp;&nbsp;
            <!-- end -->
            <a href="{:$mainlink}?file=category&act=list&sysgroupid={:$value[id]}">分类管理</a>
          </td>
        </tr>
        <!-- $value[soncate] AS $key=>$value2 -->
        <tr class="sysin{:$value[id]}" style="display:none;">
          <td>[{:$value2[id]}]</td>
          <td align="left">
            <a href="{if($value2[level]==1)}{:$mainlink}?file=category&act=list&sysgroupid={:$value2[sysgroupid]}{else}{:$mainlink}?file=msg&act=list&sysgroupid={:$value2[sysgroupid]}&cateid={:$value2[id]}{end}">
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{:$value2[space]} {:$value2[catename]}
            <!-- if($system[fanti] == on) --><!-- if($value2[catename_ft]) --> | {:$value2[catename_ft]}<!-- end --><!-- end -->
            <!-- if($system[english] == on) --><!-- if($value2[catename_en]) --> | {:$value2[catename_en]}<!-- end --><!-- end -->
            <span class="colorlight">({:$value2[level]}级分类)</span>
            </a>
          </td>
          <td>
            <a href="javascript:void(0)" onclick="qgurl('{:$mainlink}?file=category&act=modify&id={:$value2[id]}');">编辑分类</a>&nbsp;&nbsp;
            <a href="javascript:void(0)" onclick="delete_confirm2('{:$value2[catename]}',{:$value2[sysgroupid]},{:$value2[id]});">删除分类</a>&nbsp;&nbsp;
            <a href="javascript:void(0)" onclick="qgurl('{:$mainlink}?file=msg&act=list&sysgroupid={:$value2[sysgroupid]}&cateid={:$value2[id]}')">内容管理</a>
          </td>
        </tr>
        <!-- end -->
        <!-- end -->
      </table>
    </div>
  </div><!--content_box-->
</div><!--page_pad-->

<script language="JavaScript">
$(document).ready(function(){
	$(".syslist").click(function(){
		sysid = $(this).data("sysid");
		$(".sysin"+sysid).toggle();
		sysmore = $(this).find(".sysmore");
		if(sysmore.html()=="+")
		{
			sysmore.html("-");
		}
		else
		{
			sysmore.html("+");
		}
	});
});

function delete_confirm(delname,id)
{
	url = "{:$mainlink}?file=sysgroup&act=delete&id="+id;
	tip_confirm("确认删除【"+delname+"】系统组吗？特别说明，删除前请将该组的信息删除！删除后无法恢复！",url);
}
function delete_confirm2(delname,sysgroupid,id)
{
	url = "{:$mainlink}?file=category&act=delete&sysgroupid="+sysgroupid+"&id="+id;
	tip_confirm("确认删除【"+delname+"】分类吗？如果当前分类存在子分类或内容信息，是无法删除的。分类删除后无法恢复！",url);
}
</script>

<!-- inc:frame.bottom -->